/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package logica;

import dao.GenericDao;

/**
 *
 * @author Elias Mendoza
 */
public class Persistencia {

  public boolean insertar(Object obj, int forma) {
    switch (forma) {
      case 2:
        if (new GenericDao().guardarCascada(obj)) {
          return true;
        } else {
          return false;
        }
      default:
        if (new GenericDao().guardar(obj)) {
          return true;
        } else {
          return false;
        }
    }

  }
}
